Add coalesce support in OPL parser and OTAP query-engine planner#2905
Open
Paramesh324 wants to merge 2 commits intoopen-telemetry:mainfrom
Open
Add coalesce support in OPL parser and OTAP query-engine planner#2905Paramesh324 wants to merge 2 commits intoopen-telemetry:mainfrom
Paramesh324 wants to merge 2 commits intoopen-telemetry:mainfrom
Conversation
…≥2 args). Plan Coalesce in ExprLogicalPlanner by lowering to the same CASE/WHEN shape DataFusion uses for coalesce, avoiding the coalesce UDF’s physical-path error. Set requires_dict_downcast for attribute + literal mixes. Add parser and expr execution tests. Signed-off-by: Parameshwaran Krishnasamy <Parameshwaran.K@ibm.com>
Author
|
@cijothomas @albertlockett Requesting to review this. Thanks! |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2905 +/- ##
==========================================
+ Coverage 86.14% 86.21% +0.06%
==========================================
Files 707 715 +8
Lines 267469 271809 +4340
==========================================
+ Hits 230419 234327 +3908
- Misses 36526 36958 +432
Partials 524 524
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Summary
Add support for
coalesce(...)in OPL / OTAP query-engine by:coalescecalls in the OPL parser intoScalarExpression::Coalesce(CoalesceScalarExpression).ScalarExpression::Coalescein the columnar query-engine expression planner.CASE/WHENlogical expression (DataFusion-compatible behavior) to ensure correct execution in the current planning/execution path.What issue does this PR close?
coalesce#2823How are these changes tested?
coalesce(...)parsingcargo fmt --allcargo test -p otap-df-opl --libcargo test -p otap-df-query-engine --lib pipeline::expr::testcargo clippy -p otap-df-opl -p otap-df-query-engine --all-targets -- -D warningsAre there any user-facing changes?
Yes.
Users can now use
coalesce(...)in OPL expressions for OTAP query-engine pipelines, e.g.:coalesce(attributes["x"], attributes["y"], "hello")